package com.example.file.service.Impl;

import com.example.file.entity.Image;
import com.example.file.entity.SysDict;
import com.example.file.mapper.ImageMapper;
import com.example.file.mapper.SysDictMapper;
import com.example.file.service.ImageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class ImageServiceImpl implements ImageService {
    @Value("${ipaddress}")
    private String ipaddress;

    @Autowired
    private ImageMapper imageMapper;

    @Override
    public Image uploadipaddress(String url) {
        Image image = new Image();
        image.setUrl(ipaddress);
        imageMapper.insert(image);
        return image;
    }
}
